<?php
class Image extends BasicModel {
	public function __construct(Core $Site) {
		parent::__construct($Site);
	}
	public function ShowImage() {
		$ImageFile = IMAGES_PATH.$this->URL->Page['SIZE'].'/'.$this->URL->Page['FILE'];
		if (file_exists($ImageFile)) {
			$ImgType = getimagesize($ImageFile);
			header('Content-type: '.$ImgType['mime']);
			readfile($ImageFile);
		} else {
			header('Content-type: image/jpg');
			readfile(IMAGES_PATH.'noimage.jpg');	
		}
	}
}
?>